Macintosh Draw Context Structure
QuickDraw 3D defines the Macintosh draw context data structure to maintain information that is specific to Macintosh draw contexts. The Macintosh draw context data structure is defined by theTQ3MacDrawContextData
data type.
typedef struct TQ3MacDrawContextData { TQ3DrawContextData drawContextData; CWindowPtr window; TQ3MacDrawContext2DLibrary library; gxViewPort viewPort; CGrafPtr grafPort; } TQ3MacDrawContextData;
Field Description
drawContextData
- A draw context data structure defining basic information about the draw context.
window
- A pointer to a window.
library
- The two-dimensional graphics library to use when rendering an image. You can use these constants to specify a 2D graphics library:
typedef enum TQ3MacDrawContext2DLibrary { kQ3Mac2DLibraryNone, kQ3Mac2DLibraryQuickDraw, kQ3Mac2DLibraryQuickDrawGX } TQ3MacDrawContext2DLibrary;
- The constants
kQ3Mac2DLibraryQuickDraw
andkQ3Mac2DLibraryQuickDrawGX
indicate that the renderer should use QuickDraw or QuickDraw GX, respectively, in the final stage of rendering. Either theviewPort
or thegrafPort
field must contain a non-null value if QuickDraw or QuickDraw GX is to be used. The two-dimensional library is used only when copying from the back to the front buffer, never when drawing directly to the front buffer.viewPort
- A view port, as defined by QuickDraw GX. See the book Inside Macintosh: QuickDraw GX Objects for complete information about view ports.
grafPort
- A graphics port, as defined by QuickDraw. See the book Inside Macintosh: Imaging With QuickDraw for complete information about graphics ports.